<template>
  <el-table
    :data="Loginlog"
    style="width: 100%;margin-top:18px;"
    border
  >
    <el-table-column prop="username" label="用户名" align="center" >
    </el-table-column>
    <el-table-column prop="lastLogin.loginTime" label="上次登陆时间" align="center">
    </el-table-column>
    <el-table-column prop="lastLogin.ip" label="上次登陆IP地址" align="center">
    </el-table-column>
    <el-table-column prop="nowLogin.loginTime" label="本次登陆时间" align="center" >
    </el-table-column>
    <el-table-column prop="nowLogin.ip" label="本次登陆IP地址" align="center">
    </el-table-column>
  </el-table>
</template>
<script>
//引入actions的辅助函数
import { mapActions } from "vuex";
//引入state的辅助函数
import { mapState } from "vuex";
export default {
  computed: {
    ...mapState(["Loginlog"])
  },
  methods: {
    ...mapActions(["FETCH_GETLOGINLOG"])
  },
  mounted() {
    this.FETCH_GETLOGINLOG();
  }
};
</script>
